package com.customview.wzq.animdemo;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;

public class MainActivity extends AppCompatActivity {

    private ImageView mIv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mIv = (ImageView) this.findViewById(R.id.iv_demo);
    }

    public void startXmlRotate(View view) {
        mIv.startAnimation(AnimationUtils.loadAnimation(this, R.anim.rotate));
    }

    public void startXmlTranslate(View view) {
        mIv.startAnimation(AnimationUtils.loadAnimation(this, R.anim.translate));
    }

    public void startXmlAlpha(View view) {
        mIv.startAnimation(AnimationUtils.loadAnimation(this, R.anim.alpha));
    }

    public void startXmlScale(View view) {
        mIv.startAnimation(AnimationUtils.loadAnimation(this,R.anim.scale));
    }
}
